const fs = require("node:fs");

module.exports = class TextContext {
	lines = [];
	constructor(scriptPath) {
		const text = fs.readFileSync(scriptPath).toString();
		this.lines = text.split("\r\n");
	}
	*[Symbol.iterator]() {
		for (const line of this.lines) {
			yield line;
		}
	}
}
